<?php
abstract class button extends htmlwidget {
		
	public function __construct( $value = ''){
		if ( (strlen($value)) || ( ! empty($value))){
			$this->attributes['value'] = $value;
		}
	}
	
	public function setvalue($value){
		$this->attributes['value'] = $value;
	}
	
	public function getvalue(){
		if ( isset($this->attributes['value'])){
			return $this->attributes['value'];
		} else {
			return '';
		}
	}
	
	public function __toString(){
		//open tag
		$this->html = '<input type="' . $this->tag . '"';
		foreach ( $this->attributes as $key => $value){
			if ( ! empty($value) || strlen($value)){
				$this->html .= ' ' . $key . '="' . $value . '"';
			}
		}
		//add closing tag
		$this->html .=  ">";
		return $this->html;
	}	
	
}
?>